/**
 * String.prototype.padStart()
 * String.prototype.padEnd()
 */
let str = 'aqie'
str = str.padStart(8,'o')
str = str.padEnd(10,'o')
console.log(str)

// yyyy-MM-dd  2020-04-01
const now = new Date()
const year = now.getFullYear()
const month = (now.getMonth() + 1).toString().padStart(2,'0')
const day = (now.getDate()).toString().padStart(2, '0')
console.log(`${year}-${month}-${day}`)

// 显示手机号后四位
const tel = '13211111111'
console.log(tel.slice(-4).padStart(tel.length,'*'))


//
console.log(new Date().getTime()) // 13ms
let timestamp = 1607956367
console.log(timestamp.toString().padEnd(13, 0))
